#ifndef ITEM_HH
#define ITEM_HH

#include <string>
#include <vector>
#include <iostream>

// Represents an item in the game, including potions, weapons, 
// and armor. Each item has a name, description, type, value, and 
// optional level. 

class Item {
    public:
        enum class Type {
            HealPotion,
            BoostPotion,
            DefencePotion,
            Weapon,
            Armor
        };
        std::string name;
        std::string description;
        Type type;
        unsigned value;
        int level;
        Item()=default;
        ~Item()=default;
        Item(const Item& other)=default;
        Item& operator=(const Item& other)=default;
        Item(std::string name, std::string description, Type type, unsigned value,int level = 0);
};

//将Item：：Type枚举转换为字符串并输出
std::ostream& operator<<(std::ostream& os,Item::Type type);

// 全部物品获取函数
const std::vector<Item>& getAllShopItems();

#endif

